package com.stars.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName org_files_perdom
 */
@TableName(value ="org_files_perdom")
@Data
public class OrgFilesPerdom implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 文件的原始名称
     */
    private String fileName;

    /**
     * FastDFS中Storage服务器的卷名
     */
    private String groupName;

    /**
     * FastDFS自动生成的文件名和路径地址
     */
    private String remoteName;

    /**
     * 文件的大小，单位字节
     */
    private Long length;

    /**
     * 文件的上传时间
     */
    private Date createTime;

    /**
     * 
     */
    private Integer perdomid;

    private  String url ;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrgFilesPerdom other = (OrgFilesPerdom) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getFileName() == null ? other.getFileName() == null : this.getFileName().equals(other.getFileName()))
            && (this.getGroupName() == null ? other.getGroupName() == null : this.getGroupName().equals(other.getGroupName()))
            && (this.getRemoteName() == null ? other.getRemoteName() == null : this.getRemoteName().equals(other.getRemoteName()))
            && (this.getLength() == null ? other.getLength() == null : this.getLength().equals(other.getLength()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getPerdomid() == null ? other.getPerdomid() == null : this.getPerdomid().equals(other.getPerdomid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getFileName() == null) ? 0 : getFileName().hashCode());
        result = prime * result + ((getGroupName() == null) ? 0 : getGroupName().hashCode());
        result = prime * result + ((getRemoteName() == null) ? 0 : getRemoteName().hashCode());
        result = prime * result + ((getLength() == null) ? 0 : getLength().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getPerdomid() == null) ? 0 : getPerdomid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", fileName=").append(fileName);
        sb.append(", groupName=").append(groupName);
        sb.append(", remoteName=").append(remoteName);
        sb.append(", length=").append(length);
        sb.append(", createTime=").append(createTime);
        sb.append(", perdomid=").append(perdomid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}